import request from '@/utils/request'

export default {

  /** 根据条件获取用户页 */
  getUserPage(data) {
    return request({
      url: '/user-manage/list/page',
      method: 'post',
      params: data
    })
  },

  /** 添加用户 */
  addUser(data) {
    return request({
      url: '/user-manage/add',
      method: 'post',
      data
    })
  },

  /** 删除用户 */
  removeUser(id) {
    return request({
      url: `/user-manage/remove/${id}`,
      method: 'delete'
    })
  },

  /** 更新用户 */
  updateUser(id, data) {
    return request({
      url: `/user-manage/updateById/${id}`,
      method: 'put',
      data
    })
  }
}

